home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / progs / giochi / bloodbath / install / install-bb < prev    next >
Text File  |  1997-01-01  |  9KB  |  369 lines

  1. ; $VER: Install-BB 1.0 (97.01.01)
  2. ; Script to install BloodBath
  3.  
  4. (complete 0)
  5.  
  6. ;=============================================================================
  7. ; svenska strings
  8.  
  9. (if (= @language "svenska")
  10. (
  11.  
  12. (set #intro
  13. (cat "                                                      "
  14.      "      Detta program låter dig installera BloodBath    "
  15.      "                                                     "
  16.      "                                       #              "
  17.      "                 #########################            "
  18.      "               ##########################             "
  19.      "                ####  #  ##                           "
  20.      "               ##########                             "
  21.      "              ####                                    "
  22.      "             ####                                     " 
  23.      "            ####                                      "
  24.      "           ####                                       "
  25.  
  26. ))
  27.  
  28. (set #destdir
  29. (cat "Var god och välj ett ställe för spelat Bloodbath. "
  30.      "En Låda kallad ´BloodBath´ kommer att skapas här. "
  31.        "Installationen kommer att ta upp omkring 4M. "
  32. ))
  33.  
  34. (set #destexists
  35. (cat "En ´BloodBath´ låda finns redan i din valda . "
  36.      "Om du fortsätter, kommer lådan och dess innehåll att tas bort och "
  37.      "ersättas med den nya installationen. "
  38. ))
  39.  
  40. (set #icons-prompt "Välj den ikonuppsättning du vill ha.")
  41. (set #icons-help "Arkivet levereras med tre olika typer av ikoner för BloodBath spelet.\nIkoner för standard Workbench och två olika storlekar för Magic WB är medskickade.\n\nVar god och välj den typ du vill installera.")
  42. (set #icons-message "Du kan rita om ikonerna efteråt om du vill.")
  43.  
  44. (set #copylib_text "Kopierar ett nödvändigt library...")
  45.  
  46. (set #copymain "Kopierar huvud-filer...")
  47.  
  48. (set #copydocs "Kopierar textfiler...")
  49.  
  50. (set #copymore "Kopierar grafik- och ljud-filer...")
  51.  
  52. (set #copyintro "Kopierar intro-filer...")
  53.  
  54. ))
  55.  
  56.  
  57. ;=============================================================================
  58. ; English strings
  59.  
  60. (if (= @language "english")
  61. (
  62.  
  63. (set #intro
  64. (cat "                                                      "
  65.      "        This program lets you install BloodBath.      "
  66.      "                                                      "
  67.      "                                       #              "
  68.      "                 #########################            "
  69.      "               ##########################             "
  70.      "                ####  #  ##                           "
  71.      "               ##########                             "
  72.      "              ####                                    "
  73.      "             ####                                     " 
  74.      "            ####                                      "
  75.      "           ####                                       "
  76.  
  77. ))
  78.  
  79. (set #destdir
  80. (cat "Please select a place for the game BloodBath. "
  81.      "A drawer called 'BloodBath' will be created here. "
  82.           "The install will take about 4M. "
  83. ))
  84.  
  85. (set #destexists
  86. (cat "A 'BloodBath' drawer does already exists in your selected destination directory. "
  87.      "By proceeding, you indicate that you wish to delete the "
  88.      "contents of this drawer and replace them with the new "
  89.      "installation."
  90. ))
  91.  
  92. (set #icons-prompt "Please select icontype to install.")
  93. (set #icons-help "The archive is shipped with three different icons for the BloodBath game.\nIcons for the standard Workbench and two different for Magic WB are included.\n\nPlease select which of these icons you want to be installed.")
  94. (set #icons-message "You may have to edit the BloodBath icon by hand afterwards.")
  95.  
  96. (set #copylib_text "Copying a nescessary library...")
  97.  
  98. (set #copymain "Copying main-files...")
  99.  
  100. (set #copydocs "Copying textfiles...")
  101.  
  102. (set #copymore "Copying grafic- and sound-files...")
  103.  
  104. (set #copyintro "Copying intro-filer...")
  105.  
  106. ))
  107.  
  108. ;=============================================================================
  109. ; Say hello
  110.  
  111. ; (set @default-dest "Work:")
  112. (message #intro)
  113.  
  114.  
  115. ;=============================================================================
  116. ; Check for an old BB installation
  117.  
  118. (complete 5)
  119.  
  120. (if (<> (exists "BB:" (noreq)) 0)
  121. (
  122.     (set @default-dest (expandpath "BB:/"))
  123.     (set bbdir (tackon @default-dest "BloodBath"))
  124.     (set olddir (tackon @default-dest "BloodBath_old"))
  125.  
  126.     (run "assign BB: remove")
  127.  
  128.     (if (<> (exists olddir (noreq)) 0)
  129.     (
  130.         (message #oldbb "'" @default-dest "'. " #oldbbdel " '" bbdir "' " #oldbbdel2)
  131.         (run (cat "delete " bbdir " all >nil:"))
  132.         (run (cat "delete " bbdir ".info >nil:"))
  133.     )
  134.     (
  135.         (message #oldbb "'" @default-dest "'." #oldbbbak)
  136.         (rename bbdir olddir)
  137.         (rename (cat bbdir ".info") (cat olddir ".info"))
  138.     ))
  139. ))
  140.  
  141.  
  142. ;=============================================================================
  143. ; Ask for destination directory
  144.  
  145. (complete 10)
  146. (set @default-dest
  147.     (askdir
  148.         (PROMpt #destdir)
  149.         (help @askdir-help)
  150.         (default @default-dest)
  151.     )
  152. )
  153.  
  154. (set @default-dest (expandpath @default-dest))
  155. (set destination (tackon @default-dest "BloodBath"))
  156. (set docs_dir (tackon destination "docs"))
  157.  
  158. (if (<> (exists destination) 0)
  159. (
  160.     (message #destexists)
  161.     (run (cat "delete " destination " all >nil:"))
  162.     (run (cat "delete " destination ".info >nil:"))
  163. ))
  164.  
  165.  
  166. ;=============================================================================
  167. ; Lets go, create destination directory, copy all files
  168.  
  169. (complete 20)
  170.  
  171. (makedir destination (help @makedir-help))
  172. (run (cat "copy " "//BloodBath.info \"" destination ".info\""))
  173.  
  174. (makedir docs_dir)
  175. (run (cat "copy " "/docs.info \"" docs_dir ".info\""))
  176.  
  177. (complete 30)
  178.  
  179. (copyfiles
  180.     (prompt #copymain)
  181.     (source "/")
  182.     (pattern "(Bloodbath)")
  183.     (dest destination)
  184.     (infos)
  185.     (help @copyfiles-help)
  186. )
  187.  
  188. (complete 40)
  189.  
  190. (if (= @language "svenska")
  191. (
  192.  
  193. (copyfiles
  194.         (prompt #copydocs)
  195.         (source "/")
  196.         (pattern "(läsmig)")
  197.         (dest destination)
  198.         (infos)
  199.         (help @copyfiles-help)
  200. )
  201.  
  202. (copyfiles
  203.         (prompt #copydocs)
  204.         (source "/docs/bloodBath_swe.guide")
  205.         (dest destination)
  206.         (newname "docs/bloodBath_swe.guide")
  207.         (infos)
  208.         (help @copyfiles-help)
  209. )
  210.  
  211. ))
  212.  
  213. (if (= @language "english")
  214. (
  215.  
  216. (copyfiles
  217.         (prompt #copydocs)
  218.         (source "/readme")
  219.         (dest destination)
  220.         (infos)
  221.         (help @copyfiles-help)
  222. )
  223.  
  224. (copyfiles
  225.         (prompt #copydocs)
  226.         (source "/docs/bloodBath_eng.guide")
  227.         (dest destination)
  228.         (newname "docs/bloodBath_eng.guide")
  229.         (infos)
  230.         (help @copyfiles-help)
  231. )
  232.  
  233. ))
  234.  
  235. (complete 50)
  236.  
  237. (copyfiles
  238.         (prompt #copymore)
  239.         (source "/")
  240.         (pattern "(Mods|Pictures|Samples|Sprites|Libs)")
  241.         (dest destination)
  242.         (infos)
  243.         (help @copyfiles-help)
  244. )
  245.  
  246. (complete 60)
  247.  
  248. (copyfiles
  249.         (prompt #copyintro)
  250.         (source "/")
  251.         (pattern "(intro|mv|intro.anim|intro.anim.index|intro.anim.sound)")
  252.         (dest destination)
  253.         (infos)
  254.         (help @copyfiles-help)
  255. )
  256.  
  257. ;=============================================================================
  258. ; Icons settings
  259.  
  260. (complete 70)
  261.  
  262. (set #icontype
  263.    (askchoice
  264.       (prompt #icons-prompt)
  265.       (default 1)
  266.       (choices
  267.          "Standard"
  268.          "Magic WB Big"
  269.          "Magic WB Small"
  270.       )
  271.       (help #icons-help)
  272.    )
  273. )
  274.  
  275. (copyfiles
  276.    (source
  277.       (select #icontype
  278.          "/Icons/BB.info"
  279.          "/Icons/BB_MWB.info"
  280.          "/Icons/BB_MWB2.info"
  281.       )
  282.    )
  283.    (dest @default-dest)
  284.    (newname "BloodBath/BloodBath.info")
  285.    (infos)
  286. )
  287.  
  288. (copyfiles
  289.    (source
  290.       (select #icontype
  291.          "/Icons/Intro.info"
  292.          "/Icons/Intro_MWB.info"
  293.          "/Icons/Intro_MWB2.info"
  294.       )
  295.    )
  296.    (dest @default-dest)
  297.    (newname "BloodBath/Intro.info")
  298.    (infos)
  299. )
  300.  
  301. (complete 80)
  302.  
  303. (if (= @language "svenska")
  304. (
  305.  
  306. (copyfiles
  307.    (source
  308.       (select #icontype
  309.          "/Icons/BB_swe.info"
  310.          "/Icons/BB_swe_MWB.info"
  311.          "/Icons/BB_swe_MWB.info"
  312.       )
  313.    )
  314.    (dest @default-dest)
  315.    (newname "BloodBath/docs/BloodBath_swe.guide.info")
  316.    (infos)
  317. )
  318.  
  319. ))
  320.  
  321. (if (= @language "english")
  322. (
  323.  
  324. (copyfiles
  325.    (source
  326.       (select #icontype
  327.          "/Icons/BB_eng.info"
  328.          "/Icons/BB_eng_MWB.info"
  329.          "/Icons/BB_eng_MWB.info"
  330.       )
  331.    )
  332.    (dest @default-dest)
  333.    (newname "BloodBath/docs/BloodBath_eng.guide.info")
  334.    (infos)
  335. )
  336.  
  337. ))
  338.  
  339.  
  340. (if (= #icontype 0)
  341.    (message #icons-message)
  342. )
  343.  
  344.  
  345. ;=============================================================================
  346. ; Startup Sequence
  347.  
  348. (complete 90)
  349.  
  350. (startup "BB"
  351.     (prompt "Some commands will be added to your \"s:user-startup\" file.")
  352.     (help @startup-help)
  353.     (command "if exists \"" destination "\"\n")
  354.     (command "   assign BB: \"" destination "\"\n")
  355.     (command "endif")
  356. )
  357.  
  358.  
  359. ;=============================================================================
  360. ; Finish
  361.  
  362. (complete 99)
  363.  
  364. (run (cat "assign BB: " "\"" destination "\""))
  365.  
  366. ;***** Finished
  367.  
  368. (complete 100)
  369.